package com.zxshhy.controller;

import com.zxshhy.service.StorageTCCService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author zxs
 */
@RestController
@RequestMapping("/tcc/storage")
public class StorageTCCController {
    
    @Resource
    private StorageTCCService storageTCCService;
    
    @RequestMapping(path = "/deduct")
    public Boolean deduct(String commodityCode, Integer count) {
        // 扣减库存
        storageTCCService.prepareDeduct(commodityCode, count);
        return true;
    }
}
